package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.PersonalEntity;
import com.example.yunJie.digitalSentry.mapper.one.PersonalMapper;
import com.example.yunJie.digitalSentry.service.PersonalService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class PersonalServiceImpl implements PersonalService {


    private final PersonalMapper personalMapper;


    @Override
    public int insert(PersonalEntity personalEntity) {
        return personalMapper.insert(personalEntity);
    }

    @Override
    public int update(PersonalEntity personalEntity) {
        return personalMapper.update(personalEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return personalMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return personalMapper.deleteIdList(idList);
    }

    @Override
    public PersonalEntity findId(String id) {
        return personalMapper.findId(id);
    }

    @Override
    public List<PersonalEntity> findAll(PersonalEntity personalEntity) {
        return personalMapper.findAll(personalEntity);
    }

    @Override
    public PersonalEntity findByPersonalName(String s) {
        return personalMapper.findByPersonalName(s);
    }

    @Override
    public List<PersonalEntity> findByMarketName(String marketName) {
        return personalMapper.findByMarketName(marketName);
    }

    @Override
    public List<PersonalEntity> findByName(PersonalEntity personalEntity) {
        return personalMapper.findByName(personalEntity);
    }
}
